(#) androidx.appcompat:appcompat

Name
:   AppCompat
Description
:   Provides backwards-compatible implementations of UI-related Android SDK
:   functionality, including dark mode and Material theming.
License
:   [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
Vendor
:   Android Open Source Project
Identifier
:   androidx.appcompat
Feedback
:   https://issuetracker.google.com/issues/new?component=460343
Min
:   Lint 7.0
Compiled
:   Lint 8.0 and 8.1
Artifact
:   androidx.appcompat:appcompat:1.7.0

(##) Included Issues

|Issue Id                                                                        |Issue Description                                                                                        |
|--------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
|[UseSupportActionBar](UseSupportActionBar.md.html)                              |Should not call `Activity.setActionBar` if you extend `AppCompatActivity`                                |
|[UseAndroidAlpha](UseAndroidAlpha.md.html)                                      |`android:alpha` attribute missing on `ColorStateList`                                                    |
|[UseCompatLoadingForColorStateLists](UseCompatLoadingForColorStateLists.md.html)|Should not call `Resources.getColorStateList` directly                                                   |
|[UseCompatLoadingForDrawables](UseCompatLoadingForDrawables.md.html)            |Should not call `Context.getDrawable` or `Resources.getDrawable` directly                                |
|[UseAppTint](UseAppTint.md.html)                                                |`app:tint` attribute should be used on `ImageView` and `ImageButton`                                     |
|[UseSwitchCompatOrMaterialCode](UseSwitchCompatOrMaterialCode.md.html)          |Replace usage of `Switch` widget                                                                         |
|[UseSwitchCompatOrMaterialXml](UseSwitchCompatOrMaterialXml.md.html)            |Replace usage of `Switch` widget                                                                         |
|[UseCompatTextViewDrawableApis](UseCompatTextViewDrawableApis.md.html)          |Should not call `TextView.setCompoundDrawableTintList` or `TextView.setCompoundDrawableTintMode` directly|
|[UseCompatTextViewDrawableXml](UseCompatTextViewDrawableXml.md.html)            |Compat compound drawable attributes should be used on `TextView`                                         |
|[UsingOnClickInXml](UsingOnClickInXml.md.html)                                  |Using `android:onClick` on older version of the platform is broken                                       |

(##) Including

!!!
   This is not a built-in check. To include it, add the below dependency
   to your project.

```
// build.gradle.kts
implementation("androidx.appcompat:appcompat:1.7.0")

// build.gradle
implementation 'androidx.appcompat:appcompat:1.7.0'

// build.gradle.kts with version catalogs:
implementation(libs.appcompat)

# libs.versions.toml
[versions]
appcompat = "1.7.0"
[libraries]
# For clarity and text wrapping purposes the following declaration is
# shown split up across lines, but in TOML it needs to be on a single
# line (see https://github.com/toml-lang/toml/issues/516) so adjust
# when pasting into libs.versions.toml:
appcompat = {
    module = "androidx.appcompat:appcompat",
    version.ref = "appcompat"
}
```

1.7.0 is the version this documentation was generated from;
there may be newer versions available.

(##) Changes

* 1.2.0: First version includes UseAndroidAlpha, UseAppTint,
  UseCompatLoadingForColorStateLists, UseCompatLoadingForDrawables,
  UseCompatTextViewDrawableApis, UseCompatTextViewDrawableXml,
  UseSwitchCompatOrMaterialCode, UseSwitchCompatOrMaterialXml.
* 1.3.0: Adds UseSupportActionBar, UsingOnClickInXml.

(##) Version Compatibility

There are multiple older versions available of this library:

| Version            | Date     | Issues | Compatible | Compiled      | Requires |
|-------------------:|----------|-------:|------------|--------------:|---------:|
|               1.7.0|2024/05/29|      10|         Yes|    8.0 and 8.1|8.0 and 8.1|
|               1.6.1|2023/02/08|      10|         Yes|    7.3 and 7.4|       7.0|
|               1.6.0|2023/01/11|      10|         Yes|    7.3 and 7.4|       7.0|
|               1.5.1|2022/09/07|      10|         Yes|    7.3 and 7.4|       7.0|
|               1.5.0|2022/08/10|      10|         Yes|    7.3 and 7.4|       7.0|
|               1.4.2|2022/06/01|      10|         Yes|            7.1|       7.0|
|               1.4.1|2022/01/12|      10|         Yes|            7.1|       7.0|
|               1.4.0|2021/11/17|      10|         Yes|            7.1|       7.0|
|               1.3.1|2021/07/21|      10|         Yes|            4.1|       4.1|
|               1.3.0|2021/05/18|      10|         Yes|            4.1|       4.1|
|               1.2.0|2020/08/05|       8|         Yes|            4.0|       4.0|

<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="markdeep.min.js" charset="utf-8"></script><script src="https://morgan3d.github.io/markdeep/latest/markdeep.min.js" charset="utf-8"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>